package org.six11.ss.client;

import org.six11.ss.shared.Message;
import org.six11.util.adt.MultiState;

/**
 * Used by the command-line tool to join a room. 
 * 
 * @author Gabe Johnson <johnsogg@cmu.edu>
 */
public class JoinRoomCommandHandler extends CommandHandler {

  /**
   * @param state
   */
  public JoinRoomCommandHandler(MultiState state) {
    super(state);
  }

  /**
   * Used by the command-line tool to join a room. 
   */
  @Override
  public void handleCommand(String args) {
    bug("Attempting to join room " + args);
    Message msg = new Message("room");
    msg.addParam("operation", "join");
    msg.addParam("roomName", args);
    sendMessage(msg);
  }

}
